<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>用户列表｜系统管理</title>
<body class="withvernav">
    <div class="bodywrapper">
        {{include file='/public/leftmenu.tpl'}}
        <div class="centercontent tables">

            <div class="pageheader notab">
                <h1 class="pagetitle">员工列表</h1>
                <span class="pagedesc"></span>
                <div class="menulist">
                    <ul class="profile_summary">
                        <li><a href="/user/adduser" class=""><span>添加员工</span></a></li>
                    </ul>
                </div>
            </div><!--pageheader-->

            <div id="contentwrapper" class="contentwrapper">
                <div class="page">{{$pageList}} 计{{$total}}条记录，共{{$totalpage}}页</div>
                <!--搜索栏-->
                <form class="stdform stdform2" method="post" action="/management/userlist">
                    <div class="tableoptions"> 创建时间：
                        <input type="text"  name="starttime" value="{{$starttime}} " onClick="WdatePicker({dateFmt:'yyyy-MM-dd '})" class="width100 hasDatepicker" /> - <input type="text"  name="endtime" value="{{$endtime}} " onClick="WdatePicker({dateFmt:'yyyy-MM-dd '})" class="width100 hasDatepicker" />
                        其他搜索: <input type="text" name="other" id="other" class="width100" value="{{$other}}" />
                        部门:
                        <select name="classid" class="selection" style="width:100px;">
                            <option value="" {{if $status==""}} selected{{/if}}>请选择</option>
                            {{foreach from=$classid item=li key=_key}}
                            <option value="{{$li.id}}" {{if $li.id==$_department}} selected{{/if}}>{{$li.name}}</option>
                            {{/foreach}}
                        </select>
                        职务:
                        <select name="department" class="selection" style="width:100px;">
                            <option value="" {{if $status==""}} selected{{/if}}>请选择</option>
                            {{foreach from=$department item=li key=_key}}
                            <option value="{{$li.id}}" {{if $li.id==$_classid}} selected{{/if}}>{{$li.title}}</option>
                            {{/foreach}}
                        </select>
                        &nbsp;
                        <button class="btn btn_orange btn_search radius50">Search</button>

                    </div>
                </form>
                <!--搜索栏结束-->
                <table cellpadding="0" cellspacing="0" border="0" class="stdtable">
                    <colgroup>
                        <col class="con1" />
                        <col class="con0" />
                        <col class="con1" />
                        <col class="con0" />
                        <col class="con1" />
                        <col class="con0" />
                        <col class="con1" />
                    </colgroup>

                    <thead>
                        <tr>
                            <th class="head0">NO</th>
                            <th class="head0">用户名</th>
                            <th class="head0">姓名</th>
                            <th class="head0">部门</th>
                            <th class="head0">职务</th>
                            <th class="head0">创建时间</th>
                            <th class="head0">操作</th>
                        </tr>
                    </thead>

                    <tbody>
                        {{foreach from=$list item=li key=key}}
                        <tr>
                            <td>{{$li.id}}</td>
                            <td>{{$li.username}}</td>
                            <td>{{$li.name}}</td>
                            <td class="center">
                                {{foreach from=$classid item=row key=_key}}
                                {{if $li.classid == $row.id}}
                                {{$row.name}}
                                {{/if}}
                                {{/foreach}}
                            </td>
                            <td>
                                {{foreach from=$department item=row key=_key}}
                                {{if $li.department == $row.id}}
                                {{$row.title}}
                                {{/if}}
                                {{/foreach}}
                            </td>
                            <td class="center">{{$li.createtime}}</td>
                            <td class="center">
                                <a href="/user/edit?uid={{$li.id}}">编辑</a>
                                ｜
                                {{if $li.type==0}}
                                	 <a href="/user/deluser?uid={{$li.id}}&type=1"><font color="red">作废</font></a>
                                {{else}}
                               	 <a href="/user/deluser?uid={{$li.id}}&type=0">删除</a>
                                {{/if}}
                                ｜ 
                                <a href="/user/competence?uid={{$li.id}}">权限设置</a>
                            </td>
                        </tr>
                        {{/foreach}}

                    </tbody>
                </table>
                <div class="page">{{$pageList}}</div>
                <br /><br />

            </div>

        </div><!--bodywrapper-->

</body>
</html>
